package com.plugin.core.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 长者评估记录实体类
 * 
 * @author mark
 * @date 2025-07-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("elder_assessment")
@Schema(name = "ElderAssessment", description = "长者评估记录表")
public class ElderAssessment {

    @Schema(description = "评估ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "长者ID即app_user表的id")
    @TableField("elder_id")
    private Long elderId;

    @Schema(description = "评估日期")
    @TableField("assessment_date")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime assessmentDate;

    @Schema(description = "评估人")
    @TableField("assessor_name")
    private String assessorName;

    @Schema(description = "生活能力等级")
    @TableField("ability_level")
    private Integer abilityLevel;

    @Schema(description = "护理等级")
    @TableField("care_level")
    private Integer careLevel;

    @Schema(description = "认知状况")
    @TableField("cognitive_status")
    private String cognitiveStatus;

    @Schema(description = "身体状况")
    @TableField("physical_status")
    private String physicalStatus;

    @Schema(description = "心理状况")
    @TableField("psychological_status")
    private String psychologicalStatus;


    @Schema(description = "评估结果")
    @TableField("assessment_result")
    private String assessmentResult;

    @Schema(description = "备注")
    @TableField("remark")
    private String remark;

    @Schema(description = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @Schema(description = "创建人")
    @TableField("create_by")
    private String createBy;

    @Schema(description = "更新人")
    @TableField("update_by")
    private String updateBy;

    @Schema(description = "状态(0.未审核,1.审核中 2.已审核)")
    @TableField("status")
    private Integer status;
}
